//
//  FDMSearchTableSectionHeaderView.m
//  Entertainment
//
//  Created by dllo on 16/4/27.
//  Copyright © 2016年 付冬梅. All rights reserved.
//

#import "FDMSearchTableSectionHeaderView.h"

@implementation FDMSearchTableSectionHeaderView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.titleLabel = [[FDMBaseLabel alloc] init];
        [self addSubview:self.titleLabel];
        [self.titleLabel release];
        self.resultCountLabel = [[FDMBaseLabel alloc] init];
        [self addSubview:self.resultCountLabel];
        [self.resultCountLabel release];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).with.offset(10);
        make.left.equalTo(self.mas_left).with.offset(10);
        make.bottom.equalTo(self.mas_bottom).with.offset(-10);
        make.width.mas_equalTo(@150);
    }];
    [self.resultCountLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).with.offset(10);
        make.right.equalTo(self.mas_right).with.offset(-10);
        make.bottom.equalTo(self.mas_bottom).with.offset(-10);
        make.width.mas_equalTo(@150);
    }];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
